import Cookies from 'js-cookie'

const TokenKey = 'TOKEN_86'

export function getToken() {
  return Cookies.get(TokenKey)
}

export function setToken(token) {
  return Cookies.set(TokenKey, token)
}

export function removeToken() {
  return Cookies.remove(TokenKey)
}

// !#1 封装方法
const TIME_NOW = 'TIME_NOW'
// 获取本地的时间戳
export function getTimeStamp() {
  return Cookies.get(TIME_NOW)
}
export function setTimeStamp() {
  Cookies.set(TIME_NOW, Date.now())
}
